package cn.com.huzo.model.entities.purchase;

import com.fasterxml.jackson.annotation.JsonFormat;
import huzofw.model.entities.BaseEntity;
import huzofw.model.entities.IAggregateRoot;
import java.io.Serializable;
import java.sql.Timestamp;
import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * 对账单明细-订单到货情况实体类
 *
 * @author 吴旭
 */
public class NotesPayabledLinesPoStockInEntity extends BaseEntity implements Serializable, IAggregateRoot {

    private static final long serialVersionUID = -2487333611363378061L;
    private String LinesId;                  // 明细标识
    private Long HeaderId;                   // 对账单标识
    // 入库单
    private Long StockInHeaderId;            // 入库单标识
    private String StockInBillNo;            // 入库单据号
    private String WayBillNo;                // 货单号
    private Timestamp ArrivalDate;           // 到货日期
    private Timestamp StockInDate;           // 入库日期
    private Long InspectedBy;                // 验料员
    private String InspectedByName;
    private Timestamp InspectedDate;         // 验料日期
    private Long SupplierId;                 // 供应商ID
    private String SupplierName;
    private Integer ReasonId;                // 库存操作原因码
    private String Description;              // 备注
    private String Flag;                     // 强制对账标记（主要看是到货日期否在对账周期内 0：正常 1：强制）
    // 采购合同
    private Long PoId;                       // 采购订单标识
    private String PoNo;                     // 订单合同号
    private String PoTypeName;               // 合同类型
    private Timestamp SignedDate;            // 落单日期  
    private Timestamp OrderArrivalDate;      // 计划到货日期    
    private String PurchasedByName;          // 采购担当   
    private String StyleNo;                  // 款号（由明细中款号组成301/302)

    public String getLinesId() {
        return LinesId;
    }

    public void setLinesId(String LinesId) {
        this.LinesId = LinesId;
    }

    public Long getHeaderId() {
        return HeaderId;
    }

    public void setHeaderId(Long HeaderId) {
        this.HeaderId = HeaderId;
    }

    public Long getStockInHeaderId() {
        return StockInHeaderId;
    }

    public void setStockInHeaderId(Long StockInHeaderId) {
        this.StockInHeaderId = StockInHeaderId;
    }

    public String getStockInBillNo() {
        return StockInBillNo;
    }

    public void setStockInBillNo(String StockInBillNo) {
        this.StockInBillNo = StockInBillNo;
    }

    public String getWayBillNo() {
        return WayBillNo;
    }

    public void setWayBillNo(String WayBillNo) {
        this.WayBillNo = WayBillNo;
    }

    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    public Timestamp getArrivalDate() {
        return ArrivalDate;
    }

    public void setArrivalDate(Timestamp ArrivalDate) {
        this.ArrivalDate = ArrivalDate;
    }

    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    public Timestamp getStockInDate() {
        return StockInDate;
    }

    public void setStockInDate(Timestamp StockInDate) {
        this.StockInDate = StockInDate;
    }

    public Long getInspectedBy() {
        return InspectedBy;
    }

    public void setInspectedBy(Long InspectedBy) {
        this.InspectedBy = InspectedBy;
    }

    public String getInspectedByName() {
        return InspectedByName;
    }

    public void setInspectedByName(String InspectedByName) {
        this.InspectedByName = InspectedByName;
    }

    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    public Timestamp getInspectedDate() {
        return InspectedDate;
    }

    public void setInspectedDate(Timestamp InspectedDate) {
        this.InspectedDate = InspectedDate;
    }

    public Long getSupplierId() {
        return SupplierId;
    }

    public void setSupplierId(Long SupplierId) {
        this.SupplierId = SupplierId;
    }

    public String getSupplierName() {
        return SupplierName;
    }

    public void setSupplierName(String SupplierName) {
        this.SupplierName = SupplierName;
    }

    public Integer getReasonId() {
        return ReasonId;
    }

    public void setReasonId(Integer ReasonId) {
        this.ReasonId = ReasonId;
    }

    public String getDescription() {
        return Description;
    }

    public void setDescription(String Description) {
        this.Description = Description;
    }

    public String getFlag() {
        return Flag;
    }

    public void setFlag(String Flag) {
        this.Flag = Flag;
    }

    public Long getPoId() {
        return PoId;
    }

    public void setPoId(Long PoId) {
        this.PoId = PoId;
    }

    public String getPoNo() {
        return PoNo;
    }

    public void setPoNo(String PoNo) {
        this.PoNo = PoNo;
    }

    public String getPoTypeName() {
        return PoTypeName;
    }

    public void setPoTypeName(String PoTypeName) {
        this.PoTypeName = PoTypeName;
    }

    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    public Timestamp getSignedDate() {
        return SignedDate;
    }

    public void setSignedDate(Timestamp SignedDate) {
        this.SignedDate = SignedDate;
    }

    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    public Timestamp getOrderArrivalDate() {
        return OrderArrivalDate;
    }

    public void setOrderArrivalDate(Timestamp OrderArrivalDate) {
        this.OrderArrivalDate = OrderArrivalDate;
    }

    public String getPurchasedByName() {
        return PurchasedByName;
    }

    public void setPurchasedByName(String PurchasedByName) {
        this.PurchasedByName = PurchasedByName;
    }

    public String getStyleNo() {
        return StyleNo;
    }

    public void setStyleNo(String StyleNo) {
        this.StyleNo = StyleNo;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (!(o instanceof NotesPayabledLinesPoStockInEntity)) {
            return false;
        }

        final NotesPayabledLinesPoStockInEntity that = (NotesPayabledLinesPoStockInEntity) o;

        return new EqualsBuilder()
                .append(this.getLinesId(), that.getLinesId())
                .isEquals();
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public int hashCode() {
        int result = 17;
        result = 31 * result + getLinesId().hashCode();

        return result;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public String toString() {
        return ToStringBuilder.reflectionToString(this);
    }
}
